import { UPDATE_USER, LOGOUT_USER } from '../../constants/user'

const init = {}

export function user (state = init, action) {
  switch (action.type) {
    case UPDATE_USER:
      return {
        ...action.payload
      }
    case LOGOUT_USER:
      return {}
    default:
      return state
  }
}
